﻿using System.Collections;
using Cysharp.Threading.Tasks;
using FrameWork.Managers;
using Game.UI;

namespace Game.Controller
{
    public class LaunchController
    {
        
        
        public async UniTask ASyncLaunchGame()
        {
            InitGameSetting();
            await UIManager.GetInstance().OpenUI<UILoading>();
        }

        private void InitGameSetting()
        {
            
        }

        private async UniTask LoadMainScene()
        {
            await UniTask.CompletedTask;
        }

        #region singleton

        private static LaunchController _instance;

        private static readonly object Lock = new object();
        
        public static LaunchController Instance
        {
            get
            {
                if (_instance != null)
                {
                    return _instance;
                }

                lock (Lock)
                {
                    _instance ??= new LaunchController();
                }
                
                return _instance;
            }
        }

        private LaunchController()
        {
            
        }

        #endregion
    }
}